﻿using System;
using System.Windows.Forms;
using Infrastructure.Utilities;

namespace LuckyDraw.WinUI
{
	public partial class InputBoxForm : Form
	{
		public InputBoxForm()
		{
			InitializeComponent();
			this.Load += InputBoxForm_Load;
		}

		void InputBoxForm_Load(object sender, EventArgs e)
		{
			btnOK.Click += btnOK_Click;
			btnCancel.Click += btnCancel_Click;
		}

		public string CouponNo
		{
			get;
			private set;
		}

		void btnCancel_Click(object sender, EventArgs e)
		{
			this.DialogResult = DialogResult.Cancel;
		}

		void btnOK_Click(object sender, EventArgs e)
		{
			CouponNo = textBox1.Text.Trim();
			if (CouponNo.IsNullOrEmpty())
			{
				MessageBox.Show("请填写要删除的中奖号码", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
				return;
			}
			this.DialogResult = DialogResult.OK;
		}

	}
}
